// $mainColor: #9F47ED;
$mainColor: #775ce5;
$transitionTime: 0.5s;

* {
    outline: none;
}

a {
    color: black;
    text-decoration: none;
}

html,
body,
.main {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.main {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #c6a2e5 0%, #cbd9ff 100%);
}

// 表单盒子样式
.form-box {
    display: flex;
    position: relative;
    width: 700px;
    height: 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 2px 2px 2px rgba($color: $mainColor, $alpha: 0.1);

    // 背景
    .background {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row;
        position: absolute;
        width: 100%;
        height: 100%;
        color: $mainColor;

        // 文本
        .login-text {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            width: 50%;
            height: 100%;
            transform: translateX(50%);

            .title {
                margin: 0;
                font-weight: 100;
            }

            .sub-title {
                margin: 0;
                margin-bottom: 32px;
                letter-spacing: 8px;
            }

            img {
                width: 128px;
                height: 128px;
                border-radius: 50%;
            }

            .text {
                margin: 0;
                margin-top: 32px;
                margin-bottom: 16px;
                color: rgba($color: $mainColor, $alpha: 0.8);
            }

            // 链接
            a {
                text-align: center;
                line-height: 32px;
                width: 100px;
                height: 32px;
                background-color: $mainColor;
                border: 1px solid white;
                border-radius: 4px;
                color: white;
                transition: opacity $transitionTime;
                cursor: pointer;

                &:hover {
                    opacity: 0.8;
                }
            }
        }
    }

    //表单块
    .form-block {
        display: flex;
        position: absolute;
        top: -50px;
        left: 32px;
        width: calc(50% - 32px);
        height: calc(100% + 100px);
        background-color: $mainColor;
        border-radius: 8px;
        transition: all $transitionTime;
    }
}

// 重置密码盒子样式
.forget-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 100%;
    height: 100%;
    color: white;

    // 重置密码标题样式
    .forget-title {
        font-weight: 100;
        font-size: 32px;
        margin-bottom: 32px;
        letter-spacing: 8px;
        margin-right: -8px;
    }

    // 重置密码表单样式
    .forget-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;

        :nth-child(n) {
            margin-bottom: 24px;
        }

        // 输入框样式
        input {
            width: 60%;
            height: 36px;
            padding: 0px 20px;
            font-size: 18px;
            color: white;
            text-align: center;
            background-color: transparent;
            border: none;
            border-bottom: 1px solid rgba($color: white, $alpha: 0.8);
            transition: border $transitionTime;

            &::placeholder {
                color: white;
            }
        }

        // 获取验证码块样式
        .forget-code-pane {
            display: flex;
            position: relative;
            width: calc(100% - 82px);

            // 验证码输入框样式
            .forget-code {
                width: 100%;
                padding-right: 100px;
                padding-left: 10px;
            }

            // 验证码按钮样式
            .forget-code-button {
                display: block;
                position: absolute;
                top: -3px;
                right: 0px;
                width: 100px;
                height: 40px;
                padding: 0;
                font-size: 16px;
                background-color: transparent;
                border: none;
                cursor: pointer;
                transition: color $transitionTime;

                &:hover {
                    color: #cccccc;
                }

                &:disabled {
                    color: rgb(200, 200, 200);
                    cursor: not-allowed;
                }
            }
        }

        // 重置密码按钮样式
        .reset-button {
            padding: 0;
            width: calc(60% + 40px);
            height: 40px;
            color: $mainColor;
            background-color: white;
            border: 1px solid $mainColor;
            border-radius: 4px;
            transition: opacity $transitionTime;
            cursor: pointer;

            &:hover {
                opacity: 0.8;
            }
        }
    }
}